import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/main/home'
    },
    { // 登录、注册
      path: '/login',
      name: 'Login',
      component: resolve => require(['../components/common/Login.vue'], resolve)
    },
    { // 主体区域
      path: '/main/',
      name: 'Main',
      component: resolve => require(['../components/Main.vue'], resolve),
      children: [
        { // 首页
          path: 'home',
          name: 'Home',
          component: resolve => require(['../components/home/Home.vue'], resolve)
        },
        { // 邀请好友
          path: 'rewardList',
          name: 'rewardList',
          component: resolve => require(['../components/invite/rewardList.vue'], resolve)
        },
        { // 13级邀请
          path: 'level',
          name: 'level',
          component: resolve => require(['../components/invite/level.vue'], resolve)
        },
        { // 理财
          path: 'fp/',
          name: 'Fp',
          component: resolve => require(['../components/fp/Fp.vue'], resolve),
          children: [
            { // 币余宝列表
              path: 'winList',
              name: 'winList',
              component: resolve => require(['../components/fp/list/winList.vue'], resolve)
            },
            { // 币余宝列表
              path: 'digList',
              name: 'DigList',
              component: resolve => require(['../components/fp/list/DigList.vue'], resolve)
            },
            { // 智能投顾列表
              path: 'aiList',
              name: 'AiList',
              component: resolve => require(['../components/fp/list/AiList.vue'], resolve)
            },
            { // etf交易列表
              path: 'tetfList',
              name: 'TetfList',
              component: resolve => require(['../components/fp/list/TetfList.vue'], resolve)
            },
            { // otc套利列表
              path: 'otcList',
              name: 'OtcList',
              component: resolve => require(['../components/fp/list/OtcList.vue'], resolve)
            },
            { // btc交易列表
              path: 'tbtcList',
              name: 'TbtcList',
              component: resolve => require(['../components/fp/list/TbtcList.vue'], resolve)
            },
            { // ico基金列表
              path: 'icoList',
              name: 'IcoList',
              component: resolve => require(['../components/fp/list/IcoList.vue'], resolve)
            },
            { // etf指数列表
              path: 'etfList',
              name: 'EtfList',
              component: resolve => require(['../components/fp/list/EtfList.vue'], resolve)
            },
            { // btc指数列表
              path: 'btcList',
              name: 'BtcList',
              component: resolve => require(['../components/fp/list/BtcList.vue'], resolve)
            }
          ]
        },
        { // 行情
          path: 'quotes',
          name: 'Quotes',
          component: resolve => require(['../components/quotes/Quotes.vue'], resolve)
        },
        { // 行情搜索
          path: 'searchQuotes',
          name: 'SearchQuotes',
          component: resolve => require(['../components/quotes/searchQuotes.vue'], resolve)
        },
        {
          path: 'quotesDetail',
          name: 'quotesDetail',
          component: resolve => require(['../components/quotes/quotesDetail.vue'], resolve)
        },
        { // 钱包
          path: 'wallet',
          name: 'Wallet',
          component: resolve => require(['../components/wallet/wallet.vue'], resolve)
        },
        { // 添加钱包
          path: 'addwallet',
          name: 'AddWallet',
          component: resolve => require(['../components/wallet/addWallet.vue'], resolve)
        },
        { // 添加新币种
          path: 'addCurrency',
          name: 'AddCurrency',
          component: resolve => require(['../components/wallet/addCurrency.vue'], resolve)
        },
        { // 充值提醒
          path: 'recharge',
          name: 'recharge',
          component: resolve => require(['../components/wallet/recharge.vue'], resolve)
        },
        { // 选择钱包
          path: 'select',
          name: 'Select',
          component: resolve => require(['../components/wallet/select.vue'], resolve)
        },
        { // 提现
          path: 'transferOut',
          name: 'TransferOut',
          component: resolve => require(['../components/wallet/transferOut.vue'], resolve)
        },
        { // 交易明细(个人中心)
          path: 'transaction',
          name: 'Transaction',
          component: resolve => require(['../components/my/transaction.vue'], resolve)
        },
        { // 意见反馈
          path: 'feedback',
          name: 'Feedback',
          component: resolve => require(['../components/my/feedback.vue'], resolve)
        },
        { // 转入
          path: 'purseAddress',
          name: 'PurseAddress',
          component: resolve => require(['../components/wallet/purseAddress.vue'], resolve)
        },
        { // 钱包地址管理
          path: 'turnIn',
          name: 'TurnIn',
          component: resolve => require(['../components/wallet/turnIn.vue'], resolve)
        },
        { // 搜索币种
          path: 'searchCurrency',
          name: 'SearchCurrency',
          component: resolve => require(['../components/wallet/searchCurrency.vue'], resolve)
        },
        { // 趋势图
          path: 'trend',
          name: 'Trend',
          component: resolve => require(['../components/wallet/trend.vue'], resolve)
        },
        { // 我的
          path: 'my',
          name: 'My',
          component: resolve => require(['../components/my/my.vue'], resolve)
        },
        { // 活动中心
          path: 'activity',
          name: 'Activity',
          component: resolve => require(['../components/activity/activity.vue'], resolve)
        },
        { 
          path: 'voucher',
          name: 'voucher',
          component: resolve => require(['../components/activity/voucher.vue'], resolve)
        },
        { // 稳赢基金说明
          path: 'winExplain',
          name: 'winExplain',
          component: resolve => require(['../components/activity/winExplain.vue'], resolve)
        },
        { // 新人必看
          path: 'newPeople',
          name: 'NewPeople',
          component: resolve => require(['../components/home/newPeople.vue'], resolve)
        },
        { // 新人礼品
          path: 'newcomer',
          name: 'Newcomer',
          component: resolve => require(['../components/activity/newcomer.vue'], resolve)
        },
        { // 领取bncn
          path: 'receive',
          name: 'Receive',
          component: resolve => require(['../components/activity/receive.vue'], resolve)
        },
        { // 我的优惠券
          path: 'coupon',
          name: 'Coupon',
          component: resolve => require(['../components/my/coupon.vue'], resolve)
        },
        { // 充值(个人中心)充钱
          path: 'rechargeCard',
          name: 'RechargeCard',
          component: resolve => require(['../components/my/rechargeCard.vue'], resolve)
        },
        { // 充值(个人中心)充币
          path: 'rechargeCardCurr',
          name: 'RechargeCardCurr',
          component: resolve => require(['../components/my/rechargeCardCurr.vue'], resolve)
        },
        { // 提现(个人中心)提钱
          path: 'putForward',
          name: 'PutForward',
          component: resolve => require(['../components/my/putForward.vue'], resolve)
        },
        { // 提现申请(个人中心)
          path: 'application',
          name: 'Application',
          component: resolve => require(['../components/my/application.vue'], resolve)
        },
        { // 设置(个人中心)
          path: 'install',
          name: 'Install',
          component: resolve => require(['../components/my/install.vue'], resolve)
        },
        { // 密码管理(个人中心)
          path: 'management',
          name: 'Management',
          component: resolve => require(['../components/my/management.vue'], resolve)
        },
        { // 修改登录密码(个人中心)
          path: 'modifyLogin',
          name: 'ModifyLogin',
          component: resolve => require(['../components/my/modifyLogin.vue'], resolve)
        },
        { // 设置支付密码
          path: 'setPayPassword',
          name: 'SetPayPassword',
          component: resolve => require(['../components/my/setPayPassword.vue'], resolve)
        },
        { // 修改支付密码
          path: 'payPassword',
          name: 'PayPassword',
          component: resolve => require(['../components/my/payPassword.vue'], resolve)
        },
        { // 忘记支付密码
          path: 'forgetPay',
          name: 'ForgetPay',
          component: resolve => require(['../components/my/forgetPay.vue'], resolve)
        },
        { // 充值申请成功(个人中心)
          path: 'applicationRecharge',
          name: 'ApplicationRecharge',
          component: resolve => require(['../components/my/applicationRecharge.vue'], resolve)
        },
        { // 未完成订单
          path: 'noComplete',
          name: 'noComplete',
          component: resolve => require(['../components/my/noComplete.vue'], resolve)
        },
        { // 提现申请成功(个人中心)
          path: 'applicationCash',
          name: 'ApplicationCash',
          component: resolve => require(['../components/my/applicationCash.vue'], resolve)
        },
        { // 选择银行卡
          path: 'choiceBank',
          name: 'ChoiceBank',
          component: resolve => require(['../components/my/choiceBank.vue'], resolve)
        },
        { // 银行卡列表
          path: 'bankList',
          name: 'BankList',
          component: resolve => require(['../components/my/bankList.vue'], resolve)
        },
        { // 实名认证
          path: 'authentication',
          name: 'Authentication',
          component: resolve => require(['../components/my/authentication.vue'], resolve)
        },
        { // 添加银行卡
          path: 'addBank',
          name: 'AddBank',
          component: resolve => require(['../components/my/addBank.vue'], resolve)
        },
        { // 通知
          path: 'notice',
          name: 'Notice',
          component: resolve => require(['../components/my/notice.vue'], resolve)
        },
        { // 通知(二级页面)
          path: 'noticeSecond',
          name: 'NoticeSecond',
          component: resolve => require(['../components/my/noticeSecond.vue'], resolve)
        },
        {
          path: 'help',
          name: 'Help',
          component: resolve => require(['../components/help/help.vue'], resolve)
        },
        { // 分享
          path: 'share',
          name: 'Share',
          component: resolve => require(['../components/my/share.vue'], resolve)
        },
        { // 总资产
          path: 'totalAssets',
          name: 'TotalAssets',
          component: resolve => require(['../components/my/totalAssets.vue'], resolve)
        },
        { // 数字资产
          path: 'digitalAssets',
          name: 'DigitalAssets',
          component: resolve => require(['../components/my/digitalAssets.vue'], resolve)
        },
        { // 数字资产（已赎回）
          path: 'typeOrder',
          name: 'TypeOrder',
          component: resolve => require(['../components/my/typeOrder.vue'], resolve)
        },
        { // 总资产(已回款)
          path: 'returnMoney',
          name: 'ReturnMoney',
          component: resolve => require(['../components/my/returnMoney.vue'], resolve)
        },
        { // 法币总资产(查看更多)
          path: 'moreOrder',
          name: 'MoreOrder',
          component: resolve => require(['../components/my/moreOrder.vue'], resolve)
        },
        { // 订单
          path: 'order',
          name: 'Order',
          component: resolve => require(['../components/my/order.vue'], resolve)
        },
        { // 关于币哩
          path: 'aboutCoin',
          name: 'AboutCoin',
          component: resolve => require(['../components/my/aboutCoin.vue'], resolve)
        }
      ]
    },
    { // 币余宝详情
      path: '/winDetail',
      name: 'winDetail',
      component: resolve => require(['../components/fp/detail/WinDetail.vue'], resolve)
    },
    { // 币余宝详情
      path: '/digDetail',
      name: 'DigDetail',
      component: resolve => require(['../components/fp/detail/digDetail.vue'], resolve)
    },
    { // btc指数基金详情
      path: '/btcDetail',
      name: 'BtcDetail',
      component: resolve => require(['../components/fp/detail/BtcDetail.vue'], resolve)
    },
    { // 智能投顾详情
      path: '/aiDetail',
      name: 'AiDetail',
      component: resolve => require(['../components/fp/detail/AiDetail.vue'], resolve)
    },
    { // ICO基金详情
      path: '/icoDetail',
      name: 'IcoDetail',
      component: resolve => require(['../components/fp/detail/IcoDetail.vue'], resolve)
    },
    { // OTC详情
      path: '/otcDetail',
      name: 'OtcDetail',
      component: resolve => require(['../components/fp/detail/OtcDetail.vue'], resolve)
    },
    { // ETF详情
      path: '/etfDetail',
      name: 'EtfDetail',
      component: resolve => require(['../components/fp/detail/EtfDetail.vue'], resolve)
    },
    { // 订单支付页
      path: '/orderPayment',
      name: 'orderPayment',
      component: resolve => require(['../components/fp/order/orderPayment.vue'], resolve)
    },
    { // ETF历史收益
      path: '/etfProfit',
      name: 'EtfProfit',
      component: resolve => require(['../components/fp/detail/etfProfit.vue'], resolve)
    },
    { // 找回密码
      path: '/forgetPwd',
      name: 'ForgetPwd',
      component: resolve => require(['../components/common/ForgetPwd.vue'], resolve)
    },
    { // 人名币支付
      path: '/pay',
      name: 'Pay',
      component: resolve => require(['../components/common/Pay.vue'], resolve)
    },
    { // 币种支付
      path: '/paycoin',
      name: 'Paycoin',
      component: resolve => require(['../components/common/Paycoin.vue'], resolve)
    },
    { // 支付成功
      path: '/successPay',
      name: 'successPay',
      component: resolve => require(['../components/common/successPay.vue'], resolve)
    },
    { // 支付成功（失败）
      path: '/paid',
      name: 'Paid',
      component: resolve => require(['../components/common/Paid.vue'], resolve)
    },
    { // 协议文档 - 智能投顾招募说明
      path: '/aiInstruction',
      name: 'AiInstruction',
      component: resolve => require(['../components/documents/AiInstruction.vue'], resolve)
    },
    { // 协议文档 - 投资风险协议书
      path: '/investmentRisk',
      name: 'InvestmentRisk',
      component: resolve => require(['../components/documents/InvestmentRisk.vue'], resolve)
    },
    { // 协议文档 - 资产委托协议书
      path: '/assetDelegation',
      name: 'AssetDelegation',
      component: resolve => require(['../components/documents/AssetDelegation.vue'], resolve)
    },
    { // 协议文档 - BTC招募说明摘要
      path: '/btcRecruit',
      name: 'BtcRecruit',
      component: resolve => require(['../components/documents/BtcRecruit.vue'], resolve)
    },
    { // 人名币支付
      path: '/pay',
      name: 'Pay',
      component: resolve => require(['../components/common/Pay.vue'], resolve)
    },
    { // 币种支付
      path: '/paycoin',
      name: 'Paycoin',
      component: resolve => require(['../components/common/Paycoin.vue'], resolve)
    },
    { // 支付成功（失败）
      path: '/paid',
      name: 'Paid',
      component: resolve => require(['../components/common/Paid.vue'], resolve)
    },
    { // 协议文档 - 智能投顾招募说明
      path: '/aiInstruction',
      name: 'AiInstruction',
      component: resolve => require(['../components/documents/AiInstruction.vue'], resolve)
    },
    { // 协议文档 - 投资风险协议书
      path: '/investmentRisk',
      name: 'InvestmentRisk',
      component: resolve => require(['../components/documents/InvestmentRisk.vue'], resolve)
    },
    { // 协议文档 - 资产委托协议书
      path: '/assetDelegation',
      name: 'AssetDelegation',
      component: resolve => require(['../components/documents/AssetDelegation.vue'], resolve)
    },
    { // 协议文档 - BTC招募说明摘要
      path: '/btcRecruit',
      name: 'BtcRecruit',
      component: resolve => require(['../components/documents/BtcRecruit.vue'], resolve)
    },
    { // 协议文档 - ICO协议书
      path: '/icoProtocol',
      name: 'IcoProtocol',
      component: resolve => require(['../components/documents/IcoProtocol.vue'], resolve)
    },
    { // 协议文档 - eth协议书
      path: '/etfAgreement',
      name: 'EtfAgreement',
      component: resolve => require(['../components/documents/ethAgreement.vue'], resolve)
    }
  ]
})
